package cn.xy.ymcc.feign;

import cn.xy.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value="service-user",fallbackFactory = UserPhoneFeignClientfallback.class)
public interface UserPhoneFeignClient {

    @GetMapping("/user/loadByPhone/{mobile}")
    JSONResult loadByPhone(@PathVariable("mobile") String mobile);


    @GetMapping("/user/{id}")
    JSONResult get(@PathVariable("id")Long id);

    @RequestMapping(value = "/user/list",method = RequestMethod.GET)
    JSONResult list();
}
